<ion-modal-view>
    <ion-tabs class="tabs-stable tabs-icon-top tabs-positive">
        <ion-tab title="Single" icon="ion-ios-person">
            <ion-header-bar class="bar-positive">
                <button ng-click="hidespenders()" class="button button-clear button-icon ion-ios-arrow-back"></button>
                <h1 class="title">{{headerText}}</h1>
            </ion-header-bar>
            <ion-content padding="true" class="has-header">
                <label ng-repeat="user in users" ng-if="!multiSelect" class="item item-text-wrap" ng-click='validateSinglepayer(user)'>
                    {{user.name}}
                </label>
            </ion-content>
        </ion-tab>
        <ion-tab title="Multiple" icon="ion-ios-people">
            <form name="spendersform">
                <ion-header-bar class="bar-positive">
                    <button ng-click="hidespenders()" class="button button-clear button-icon ion-ios-arrow-back"></button>
                    <h1 class="title">{{headerText}}</h1>
                    <button ng-click="validateMultiplepayers(spendersform)" type="submit" class="button button-clear button-icon ion-checkmark"></button>
                </ion-header-bar>
                <ion-content padding="true" class="has-header">
                    <div class="form-group" ng-repeat="user in users">
                        <label for="{{user.id}}" class="item item-input">
                            <span class="input-label">{{user.name}}</span>
                            <number-only-input input-value="formdata.contrib[user.id]">
                        </label>
                    </div>
                    <div class="item">Total <b>{{gettotal(formdata.contrib).toFixed(2)}}</b> of <b>{{totalamt.toFixed(2)}}</b></div>
                    <div class="item" name="remaining_amount" id="remaining_amount">remaining <b><span id="rem">{{(totalamt-gettotal(formdata.contrib)).toFixed(2)}}</span></b></div>
            </form>
            </ion-content>
        </ion-tab>
    </ion-tabs>
</ion-modal-view>
